Wireless communication device

ABSTRACT

A wireless communication device may execute a response process and a search process with a first operation being performed as a trigger in a first period after the first operation. The response process may include receiving a search signal from a specific external device and sending a response signal to the specific external device in response to the search signal. The search process may include sending the search signal to the specific external device and receiving the response signal from the specific external device. The wireless communication device may communicate a wireless profile with the specific external device so as to establish a wireless connection with the specific external device in a case where the first operation is performed. The wireless communication device may execute the response process in a second period before the first operation is performed.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.13/429,664, filed Mar. 26, 2012, and further claims priority to JapanesePatent Application No. 2011-132286, filed on Jun. 14, 2011, the contentsof both of which are hereby incorporated by reference into the presentapplication.

TECHNICAL FIELD

A technique disclosed in the present specification relates to a wirelesscommunication device.

DESCRIPTION OF THE RELATED ART

Conventionally, Wi-Fi Direct (called “WFD” below), formulated by Wi-FiAlliance, is known. In WFD, when a predetermined operation is performedon a wireless communication device that is to establish a wirelessconnection with an external device, the wireless communication deviceexecutes a response process, in which the wireless communication devicereceives a Probe Request signal from the external device and sends aProbe Response signal, and executes a search process, in which thewireless communication device sends a Probe Request signal to theexternal device and receives a Probe Response signal. For example, ifthe external device can find the wireless communication device, theexternal device sends a connection request signal to the wirelesscommunication device. Consequently, a wireless connection can beestablished between the external device and the wireless communicationdevice.

SUMMARY

In the present specification, a technique is disclosed for causing awireless connection to be established appropriately between a wirelesscommunication device and an external device.

One technique disclosed in the present application is a wirelesscommunication device. The wireless communication device may comprise oneor more processors, and a memory that stores a computer programincluding instructions executed by the one or more processors. Theinstructions may cause the one or more processors, when executed by theone or more processors, to function as a communication controlling unitand an establishing controlling unit. The communication controlling unitmay be configured to execute a response process and a search processwith a first operation being performed as a trigger in a first periodafter the first operation. The response process may include receiving asearch signal from a specific external device and sending a responsesignal to the specific external device in response to the search signal.The search signal received from the specific external device may be asignal for the specific external device to search for the wirelesscommunication device. The search process may include sending the searchsignal to the specific external device and receiving the response signalfrom the specific external device. The search signal sent to thespecific external device may be a signal for the wireless communicationdevice to search for the specific external device. The establishingcontrolling unit may be configured to communicate a wireless profilewith the specific external device so as to establish a wirelessconnection with the specific external device by using the wirelessprofile in a case where the first operation is performed. Thecommunication controlling unit may be further configured to execute theresponse process in a second period before the first operation isperformed.

Moreover, a method for realizing the wireless communication device isalso novel and useful. In addition, a computer program for realizing thewireless communication device and a non-transitory computer readablestorage medium that stores the computer program are also novel anduseful.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of the configuration of a communication system.FIG. 2 shows a flowchart of a printer process. FIG. 3 shows a flowchartof a wireless connection process. FIG. 4 shows a flowchart of anauthentication connection process. FIG. 5 shows a sequence view of acase A. FIG. 6 shows a sequence view of a case B.

EMBODIMENT Embodiment (Configuration of System)

As shown in FIG. 1, a communication system 2 comprises a printer 10 (aperipheral of PCs 60 and 70), and the plurality of PCs 60, 70. Theapparatuses 10, 60, 70 are each capable of executing a wirelesscommunication function in accordance with Wi-Fi Direct (to bedescribed). Moreover, below, Wi-Fi Direct is called “WFD”, and thewireless communication function in accordance with Wi-Fi Direct iscalled a “WFD function”. The apparatuses 10, 60, 70 are capable ofestablishing a wireless connection in accordance with WFD, therebyconstructing a wireless network. Consequently, the apparatuses 10, 60,70 become capable of wirelessly communicating object data of acommunication object, such as printing data, etc.

(Configuration of Printer 10)

The printer 10 comprises an operating unit 12, a display unit 14, aprint executing unit 16, a wired interface 18, a wireless interface 20,and a controller 30. The units 12 to 30 are connected with a bus line(reference number omitted).

The operating unit 12 consists of a plurality of keys. A user canprovide various instructions to the printer 10 by operating theoperating unit 12. The plurality of keys constituting the operating unit12 includes a switching key 12 a. The display unit 14 is a display fordisplaying various information. The print executing unit 16 comprises aprinting mechanism such as an ink jet method, laser method, etc.printing mechanism, and executes printing according to an instructionfrom the controller 30. The wired interface 18 is an interface forexecuting wired communication, and is connected with a wired circuit(e.g., a LAN circuit). The wireless interface 20 is an interface forexecuting wireless communication. Moreover, two MAC addresses areassigned to the wireless interface 20. One of the MAC addresses is anaddress for wireless communication in accordance with WFD, and the otherof the MAC addresses is an address for normal wireless communication inaccordance with a standard differing from WFD.

The controller 30 comprises a CPU 32 and a memory 34. The CPU 32executes various processes according to a program stored in the memory34. The memory 34 consists of a ROM, RAM, hard disk, etc. The memory 34stores the program executed by the CPU 32, and stores data acquired orcreated in the course of the CPU 32 executing processes. The CPU 32realizes the functions of a communication controlling unit 40 and anestablishment controlling unit 42 by executing processes according tothe aforementioned program.

(Switching Key 12 a)

In the present embodiment, the switching key 12 a is a soft switch.However, in a variant, the switching key 12 a may be a hard switch. Theswitching key 12 a is a switch for switching settings between a settingfor turning ON the wired interface 18 (called “wired I/F ON setting”below) and a setting for turning ON the wireless interface 20 (called“wireless I/F ON setting” below). The switching key 12 a is a toggletype switch. Consequently, by operating the switching key 12 a, the usercan exclusively select the wired I/F ON setting or the wireless I/F ONsetting.

In a state where the wired I/F ON setting has been selected, thecommunication controlling unit 40 (see FIG. 1) can execute wiredcommunication using the wired interface 18, but cannot execute wirelesscommunication using the wireless interface 20. Further, in a state wherethe wireless I/F ON setting has been selected, the communicationcontrolling unit 40 cannot execute wired communication using the wiredinterface 18, but can execute wireless communication using the wirelessinterface 20.

As described above, a MAC address for wireless communication inaccordance with WFD and a MAC address for normal wireless communicationare assigned to the wireless interface 20. In the state where thewireless I/F ON setting has been selected, the user can operate theswitching key 12 a to further exclusively select a setting for executingwireless communication in accordance with WFD (called “WFD I/F ONsetting” below) or a setting for executing normal wireless communication(called “normal wireless I/F ON setting” below).

In the state where the WFD I/F ON setting has been selected, thecommunication controlling unit 40 can execute wireless communication inaccordance with WFD by using the MAC address for wireless communicationin accordance with WFD, but cannot execute normal wireless communicationby using the MAC address for normal wireless communication. In the statewhere the normal wireless I/F ON setting has been selected, thecommunication controlling unit 40 can execute normal wirelesscommunication, but cannot execute wireless communication in accordancewith WFD. Moreover, below, the wired I/F ON setting, and the normalwireless I/F ON setting are together called “WFD I/F OFF setting”.

(Configuration of PC 60)

A PC 60 comprises a CPU, memory, display, etc. (not shown). The memoryof the PC 60 stores a printer driver program for the printer 10. The CPUof the PC 60 can create printing data of a printing object by using theprinter driver program. In a state where a wireless connection has beenestablished between the printer 10 and the PC 60, the PC 60 canwirelessly send the printing data to the printer 10. Moreover, the PC 70has the same configuration as the PC 60.

(WFD)

As described above, the apparatuses 10, 60, 70 are capable of executingthe WFD function. WFD is a standard formulated by Wi-Fi Alliance. WFD isdescribed in “Wi-Fi Peer-to-Peer (P2P) Technical SpecificationVersion1.1” created by Wi-Fi Alliance.

In WFD, three states have been defined as the states of the apparatus:Group Owner state (called “G/O state” below), client state, and devicestate. An apparatus capable of executing the WFD function is capable ofselectively operating in one state among the three states.

One wireless network consists of an apparatus in the G/O state and anapparatus in the client state. There can be only one G/O state apparatuspresent in one wireless network, but one or more client stateapparatuses can be present. The G/O state apparatus manages the one ormore client state apparatuses. Specifically, the G/O state apparatuscreates an administration list in which identification information(i.e., MAC address) of each of the one or more client state apparatusesis written. When a client state apparatus newly participates in awireless network, the G/O state apparatus adds the identificationinformation of that apparatus to the administration list, and when theclient state apparatus leaves the wireless network, the G/O stateapparatus deletes the identification information of that apparatus fromthe administration list.

The G/O state apparatus is capable of wirelessly communicating objectdata of a communication object (e.g., data that includes network layerinformation of the OSI reference model (printing data, etc.)) with anapparatus registered in the administration list, i.e., with an apparatusin the client state. However, with an apparatus not registered in theadministration list, the G/O state apparatus is capable of wirelesslycommunicating data for participating in the wireless network (e.g., datathat does not include network layer information (physical layer datasuch as a Probe Request signal, Probe Response signal, etc.)) but is notcapable of wirelessly communicating the object data. For example, theprinter 10 that is in the G/O state is capable of wirelessly receivingprinting data from the PC 60 that is registered in the administrationlist (i.e., the PC 60 that is in the client state), but is not capableof wirelessly receiving printing data from a PC that is not registeredin the administration list.

Further, the G/O state apparatus is capable of relaying the wirelesscommunication of object data (printing data, etc.) between a pluralityof client state apparatuses. For example, in case the PC 60 that is inthe client state should wirelessly send object data to the PC 70 that isin the client state, the PC 60 first wirelessly sends the object data tothe printer 10 that is in the G/O state, and the printer 10 wirelesslysends the object data to the PC 70. That is, the G/O state apparatus iscapable of executing the function of an AP (access point) of a wirelessnetwork.

Moreover, an apparatus that is not participating in the wireless network(i.e., an apparatus not registered in the administration list) is adevice state apparatus. The device state apparatus is capable ofwirelessly communicating data for participating in the wireless network(physical layer data such as a Probe Request signal, Probe Responsesignal, etc.), but is not capable of wirelessly communicating objectdata (printing data, etc.) via the wireless network.

(Mode for Executing WFD Wireless Connection)

A WPS (Wi-Fi Protected Setup) wireless connection mode is used as themode for executing a WFD wireless connection. The WPS wirelessconnection mode includes a PIN (Personal Identification Number) codemode and a PBC (Push Button Configuration) mode. Below, a summary of thePIN code mode will be described first, then a summary of the PBC modewill be described.

(PIN Code Mode)

For example, a situation is assumed in which a wireless connectionbetween the printer 10 that is in the device state and the PC 60 that isin the device state is to be established using the WPS PIN code mode. Insuch a situation, the user performs a mode selection operation in theoperating unit 12 of the printer 10 to select the PIN code mode fromamong the PBC mode and the PIN code mode. Further, the user performs amode selection operation in an operating unit of the PC 60 to select thePIN code mode.

In this case, the printer 10 and the PC 60 each execute a search process(explained in detail below) to find the other. For example, in case thePC 60 has found the printer 10, the user executes an apparatus selectionoperation in the operating unit of the PC 60 to select the printer 10.Consequently, the PC 60 sends a connection request signal to the printer10. In this case, e.g., the printer 10 creates and displays a PIN code.The user inputs the PIN code into the PC 60.

The printer 10 and the PC 60 execute G/O negotiation (explained indetail below) to determine which will assume the G/O state and whichwill assume the client state. Next, the printer 10 and the PC 60 executeWPS negotiation. Specifically, the apparatus which assumes the G/O state(e.g., the printer 10) wirelessly sends a wireless profile (SSID,authentication mode, encryption mode, password, etc.), this beinginformation needed to establish a wireless connection, to the apparatuswhich assumes the client state (e.g., the PC 60). Consequently, theprinter 10 and the PC 60 can establish a wireless connection by usingthe same wireless profile. Moreover, authentication of the PIN code isperformed during the course of the WPS negotiation.

(PBC Mode)

The user can perform the mode selection operation to select the PBC modein each of the printer 10 and the PC 60. In this case, the PIN code isnot input by the user into the printer 10 and the PC 60. In the PBCmode, a predetermined PIN code is used in the apparatuses between whicha wireless connection is to be established. Other points (searchprocess, G/O negotiation, and WPS negotiation) are the same as the PINcode mode.

(Printer Process: FIG. 2)

Next, the contents of a printer process executed by the printer 10 ofthe present embodiment will be described with reference to FIG. 2.

The user can perform an operation on the switching key 12 a (see FIG. 1)to change from the WFD I/F OFF setting (e.g., the wired I/F ON setting)to the WFD I/F ON setting. In this case, the controller 30 determinesYES in S10, and proceeds to S12. In S12, the communication controllingunit 40 starts a Listen process (to be described).

Further, the user can perform an operation on the switching key 12 a tochange from the WFD I/F ON setting to the WFD I/F OFF setting (e.g., thewired I/F ON setting). In this case, the controller 30 determines NO inS10, determines YES in S14, and proceeds to S16. In S16, thecommunication controlling unit 40 ends the Listen process.

In S18, the communication controlling unit 40 monitors whether aconnection request signal has been wirelessly received. Moreover, theconnection request signal includes data of the physical layer of the OSIreference model, and does not include data of a layer higher than thephysical layer (e.g., network layer). If the connection request signalhas been wirelessly received, the communication controlling unit 40determines NO in S10, NO in S14, YES in S18, and proceeds to S20. InS20, the communication controlling unit 40 stores information, in apredetermined storage area in the memory 34, related to a specificapparatus, this being the apparatus that is the sending source of theconnection request signal. Specifically, the connection request signalincludes a MAC address of the specific apparatus, an IP address of thespecific apparatus, information indicating which, from among the PINcode mode and the PBC mode, has been selected in the specific apparatus,etc. The communication controlling unit 40 stores this information inthe predetermined storage area.

Moreover, the communication controlling unit 40 could receive aplurality of connection request signals from a plurality of apparatuses.Each time a connection request signal is received, the communicationcontrolling unit 40 deletes the information that was being stored in thepredetermined storage area, and stores information in the predeterminedstorage area related to the apparatus which is the sending source of theconnection request signal. Consequently, the information which was lastreceived related to the apparatus which is the sending source of theconnection request signal is stored in the predetermined storage area.Moreover, the contents stored in the predetermined storage area aredeleted in case of changing from the WFD I/F ON setting to the WFD I/FOFF setting, or in case a predetermined period has elapsed since theinformation was last stored in the predetermined storage area.

Further, the user can perform the mode selection operation on apredetermined key included in the operating unit 12 to select the PINcode mode or the PBC mode. In this case, the controller 30 determines NOin S10, NO in S14, NO in S18, YES in S22, and proceeds to the wirelessconnection process of S24. Moreover, when the mode selection operationis performed in the printer 10 while the printer 10 is in the G/O stateor the device state, the printer 10 executes the wireless connectionprocess of S24 while maintaining the current state (i.e., the G/O stateor the device state). When the mode selection operation is performedwhile the printer 10 is in the client state, the printer 10 transfersfrom the client state to the device state (i.e., the printer 10 leavesthe wireless network in which it was participating in the client state),and executes the wireless connection process of S24 in the device state.

(Wireless Connection Process; FIG. 3)

In S24, the controller 30 executes the wireless connection process. Asshown in FIG. 3, in S40 the controller 30 determines whether the currentsetting of the printer 10 is the WFD I/F ON setting. In case the currentsetting of the printer 10 is the WFD I/F ON setting (the case of YES inS40), the controller 30 skips S42 to S46, and proceeds to S48. On theother hand, in case the current setting of the printer 10 is the WFD I/FOFF setting (the case of NO in S40), in S42 the controller 30 causes thedisplay unit 14 to display a screen which prompts change to the WFD I/FON setting. Thereby, the user can operate the operating unit 12 toselect whether to change to the WFD I/F ON setting or to maintain theWFD I/F OFF setting.

In case change to the WFD I/F ON setting was selected by the user, thecontroller 30 determines YES in S44, and proceeds to S46. In S46, thecommunication controlling unit 40 starts the Listen process (to bedescribed). Upon ending S46, the controller 30 proceeds to S48. On theother hand, in case maintaining the WFD I/F OFF setting was selected bythe user, the controller 30 determines NO in S44, skips the processesfrom S46 onwards, and ends the wireless connection process.

In S48, the controller 30 causes the display unit 14 to display a screenprompting the object apparatus (e.g., the PC 60), with which the printer10 is to establish a wireless connection, to be changed to the WFD I/FON setting. Thereby, the user can operate an operating unit of theobject apparatus to change the setting of the object apparatus to theWFD I/F ON setting, and can then operate the operating unit 12 of theprinter 10 to select an OK button. Moreover, in case the setting of theobject apparatus is already the WFD I/F ON setting when the screen isdisplayed in S48, the user can operate the operating unit 12 of theprinter 10 to select the OK button without having operated the operatingunit of the object apparatus. When the OK button is operated, thecontroller 30 determines YES in S50, and proceeds to S52.

In S52, the controller 30 determines whether information is being storedin the predetermined storage area (see S20 of FIG. 2) within the memory34. In case information is being stored in the predetermined storagearea (the case of YES in S52), this means that the printer 10 hasalready received the connection request signal from the object apparatus(e.g., the PC 60). In this case, the communication controlling unit 40skips S54 to S60, and proceeds to S62. On the other hand, in caseinformation is not being stored in the predetermined storage area (thecase of NO in S52), the process proceeds to S54.

In S54, the communication controlling unit 40 executes a Scan process,the Listen process, and a Search process. The communication controllingunit 40 cannot execute two or more of these three processessimultaneously and, therefore, after executing one process, it executesanother process. That is, the communication controlling unit 40 executesthe Scan process, the Listen process and the Search processsequentially.

The Scan process is a process for searching for a G/O state apparatuspresent in the surroundings of the printer 10. Specifically, in the Scanprocess, the communication controlling unit 40 sequentially usesthirteen channels 1ch to 13ch to sequentially send a Probe Requestsignal wirelessly.

For example, in case an apparatus that is in the G/O state (called“specific G/O apparatus” below) is present in the surroundings of theprinter 10, it has been determined in advance that the specific G/Oapparatus uses one channel from among 1ch to 13ch. Consequently, thespecific G/O apparatus wirelessly receives a Probe Request signal fromthe printer 10. In this case, the specific G/O apparatus wirelesslysends a Probe Response signal to the printer 10. This Probe Responsesignal includes information indicating that the specific G/O apparatusis in the G/O state. Consequently, the communication controlling unit 40of the printer 10 can find the specific G/O apparatus. Moreover, theProbe Response signal further includes information indicating a devicename of the specific G/O apparatus and a category (e.g., printer, PC,etc.) of the specific G/O apparatus, and a MAC address of the specificG/O apparatus. Consequently, the communication controlling unit 40 canacquire information relating to the specific G/O apparatus.

Moreover, e.g., in case an apparatus that is in the device state (called“specific device apparatus” below) is present in the surroundings of theprinter 10, it has been determined in advance that the specific deviceapparatus uses one channel from among 1ch, 6ch, 11ch. Consequently, thespecific device apparatus also wirelessly receives a Probe Requestsignal from the printer 10. In this case, the specific device apparatuswirelessly sends a Probe Response signal to the printer 10. However,this Probe Response signal includes information indicating that theapparatus is in the device state, and does not include informationindicating that the apparatus is in the G/O state. Further, even if anapparatus that is in the client state wirelessly receives a ProbeRequest signal from the printer 10, the apparatus that is in the clientstate does not wirelessly send a Probe Response signal to the printer10. Consequently, in the Scan process, the communication controllingunit 40 can appropriately find the specific G/O apparatus.

The Listen process is a process for responding to the Probe Requestsignal wirelessly sent from the specific device apparatus which isexecuting the Search process. That is, upon wirelessly receiving theProbe Request signal from the specific device apparatus, thecommunication controlling unit 40 wirelessly sends a Probe Responsesignal. This Probe Response signal includes information indicating thatthe printer 10 is in the device state, information indicating the devicename and the category of the printer 10, and the MAC address of theprinter 10. The specific device apparatus can find the printer 10 bymeans of the communication controlling unit 40 sending the ProbeResponse signal.

In the Search process, the communication controlling unit 40sequentially uses the three channels 1ch, 6ch, 11ch to sequentially senda Probe Request signal wirelessly. Thereby, the communicationcontrolling unit 40 wirelessly receives a Probe Response signal from thespecific device apparatus. This Probe Response signal includesinformation indicating that the specific device apparatus is in thedevice state, information indicating the device name and the category ofthe specific device apparatus, and a MAC address of the specific deviceapparatus. Thereby, the communication controlling unit 40 can find thespecific device apparatus. Moreover, the specific G/O apparatus, also,can wirelessly send a Probe Response signal to the printer 10 inresponse to the Probe Request signal sent in the Search process of theprinter 10. However, this Probe Response signal includes informationindicating that the apparatus is in the G/O state, and does not includeinformation indicating that the apparatus is in the device state.Further, as described above, even if an apparatus that is in the clientstate wirelessly receives a Probe Request signal from the printer 10,the apparatus that is in the client state does not wirelessly send aProbe Response signal to the printer 10. Consequently, in the Searchprocess, the communication controlling unit 40 can appropriately findthe specific device apparatus.

Moreover, in S54, after first having executed the Scan process one time,the communication controlling unit 40 repeatedly executes the set of theListen process and the Search process until a predetermined period haselapsed. Although not shown in the flowchart of FIG. 3, when thepredetermined period elapses, the controller 30 causes a screen in thedisplay unit 14 to be displayed for the user to select whether tocontinue or end the Listen process and the Search process. If the userselects “continue”, the communication controlling unit 40 repeatedlyexecutes the set of the Listen process and the Search process until thepredetermined period has again elapsed. If the user selects “end”, theprocess proceeds to S56.

In S56, the communication controlling unit 40 determines whether aconnection request signal has been wirelessly received from the objectapparatus during the process S54. In case a connection request signalhas been wirelessly received during the process S54 (the case of YES inS56), the communication controlling unit 40 skips S58 and S60, andproceeds to S62. On the other hand, in case a connection request signalnot been received (the case of NO in S56), the process proceeds to S58.

In S58, the controller 30 causes the display unit 14 to display anapparatus list. The controller 30 can find the specific G/O apparatus inthe Scan process (see S54), and can find the specific device apparatusin the Search process (see S54). The controller 30 causes the displayunit 14 to display information relating to the apparatuses found in theprocess S54 (i.e., the information acquired in S54). In the example ofFIG. 3, in S58, information (G/O state, printer, MAC address) relatingto an apparatus corresponding to a device name “XXX”, and information(device state, PC, MAC address) relating to an apparatus correspondingto a device name “YYY” is displayed in the display unit 14.

The user can learn the apparatuses present in the surroundings of theprinter 10 by looking at the apparatus list displayed in S58, and canexecute the apparatus selection operation in the operating unit 12 toselect which apparatus should establish a wireless connection with theprinter 10 (i.e., an operation to select the object apparatus (e.g., thePC 60)). When the apparatus selection operation has been performed, thecontroller 30 determines YES in S60, and proceeds to an authenticationconnection process of S62.

(Authentication Connection Process; FIG. 4)

In S62, the controller 30 executes the authentication connectionprocess. The process described below is executed first, before theprocess S82 of FIG. 4 is executed. If the connection mode of the printer10 and the object apparatus is the PIN code mode, the PIN code isdisplayed in one of the printer 10 and the object apparatus, and theuser inputs the PIN code into the other apparatus from among the printer10 and the object apparatus. If the display or input of the PIN code isexecuted in the printer 10, the process proceeds to S82. On the otherhand, if the connection mode of the printer 10 and the object apparatusis the PBC mode, the process proceeds to S82 without the display orinput of the PIN code being executed.

In S82, the establishment controlling unit 42 determines whether thecurrent state of the printer 10 is the device state and whether thecurrent state of the object apparatus is the device state. In case ofYES in S82 (the current state of the printer 10=device state, and thecurrent state of the object apparatus=device state), the processproceeds to S84.

Moreover, as described above, the object apparatus is determined asfollows according to each case. (Case 1) In case of YES in S52 of FIG.3, in case a connection request signal has been received (the case ofYES in S18) before the mode selection operation is performed by theuser, YES is determined in S52 of FIG. 3. In this case, an apparatusthat is the sending source of the connection request signal that waslast received (i.e., an apparatus having the information stored in S20of FIG. 2) is the object apparatus. (Case 2) In case a connectionrequest signal has been received after the mode selection operation hasbeen performed by the user, YES is determined in S56 of FIG. 3. In thiscase, an apparatus that is the sending source of the connection requestsignal received in S56 of FIG. 3 is the object apparatus. (Case 3) Incase a connection request signal is not received, the apparatus list isdisplayed in S58 of FIG. 3. An apparatus selected from the apparatuslist by the user is the object apparatus.

In S84, the establishment controlling unit 42 executes a G/O negotiationwith the object apparatus. As described above, only one G/O stateapparatus can be present in one wireless network. Consequently, theestablishment controlling unit 42 executes the G/O negotiation,determining one apparatus from among the printer 10 and the objectapparatus as the G/O, and determining the other apparatus as the client.

In S84, first, the establishment controlling unit 42 wirelessly sends aconnection request signal to the object apparatus, and wirelesslyreceives an OK signal from the object apparatus. Next, the establishmentcontrolling unit 42 wirelessly sends information indicating G/O priorityof the printer 10 to the object apparatus, and wirelessly receivesinformation indicating G/O priority of the object apparatus from theobject apparatus. Moreover, the G/O priority of the printer 10 is anindex indicating the priority with which the printer 10 should becomethe G/O, and is predetermined in the printer 10. Similarly, the G/Opriority of the object apparatus is an index indicating the prioritywith which the object apparatus should become the G/O. For example, anapparatus (e.g., a PC) in which CPU and memory capacity arecomparatively high can execute other processes rapidly while operatingas a G/O. Consequently, in this type of apparatus, the G/O priority isusually set such that the priority of becoming G/O is high. On the otherhand, e.g., an apparatus in which CPU and memory capacity arecomparatively low might not be able to execute other processes rapidlywhile operating as a G/O. Consequently, in this type of apparatus, theG/O priority is usually set such that the priority of becoming G/O islow.

The establishment controlling unit 42 compares the G/O priority of theprinter 10 and the G/O priority of the object apparatus, determines theapparatus (the printer 10 or the object apparatus) with the higherpriority as the G/O, and determines the apparatus (the object apparatusor the printer 10) with the lower priority as the client. The objectapparatus determines the G/O and the client based on the G/O priority ofthe printer 10 and the G/O priority of the object apparatus using thesame method as the printer 10. When the G/O negotiation of S84 ends, theprocess proceeds to S86.

Moreover, upon ending the G/O negotiation of S84, the printer 10transfers from the device state to the determined state (i.e., the G/Ostate or the client state). Further, the object apparatus also transfersfrom the device state to the determined state (i.e., the client state orthe G/O state).

Further, in case it was determined in S82 that the current state of theobject apparatus is the G/O state (the case of NO in S82), the printer10 transfers from the device state or the G/O state to the client statewithout executing the G/O negotiation of S84. This is because, sinceonly one apparatus in the G/O state can be present in one wirelessnetwork, the printer 10 cannot assume the G/O state. Further, in case itwas determined in S82 that the current state of the printer 10 is theG/O state (the case of NO in S82), the printer 10 is maintained in theG/O state, which is the current state, without executing the G/Onegotiation of S84. In this case, the object apparatus transfers fromthe device state to the client state. In case of NO in S82, the processproceeds to S86.

In S86, the establishment controlling unit 42 determines whether thecurrent state of the printer 10 is the G/O state, and whether thecurrent state of the object apparatus is the client state. In the caseof YES in S86 (the current state of the printer 10=G/O state, and thecurrent state of the object apparatus=client state), the establishmentcontrolling unit 42 proceeds to S88. On the other hand, in the case ofNO in S86 (the current state of the printer 10=client state, and thecurrent state of the object apparatus=G/O state), the process proceedsto S90.

In S88, the establishment controlling unit 42 executes WPS negotiationfor the G/O state. For example, in case the connection mode selected inS22 of FIG. 2 is the PIN code mode, the establishment controlling unit42 converts specific data (e.g., packet data communicated last betweenthe printer 10 and the object apparatus) into a hash code using the PINcode displayed in the printer 10 or the PIN code input into the printer10. In this case, the object apparatus, also, converts the specific datainto a hash code using the PIN code displayed in the object apparatus orthe PIN code input into the object apparatus. Further, e.g., in case theconnection mode selected in S22 of FIG. 2 is the PBC mode, theestablishment controlling unit 42 converts the specific data into a hashcode using a predetermined PIN code. In this case, the object apparatus,also, converts the specific data into a hash code using thepredetermined PIN code.

Either the printer 10 or the object apparatus determines whether thehash code created by the printer 10 and the hash code created by theobject apparatus are matching (i.e., executes authentication of the PINcode). In case the two hash codes match, i.e., in case authentication ofthe PIN code succeeds, the establishment controlling unit 42 wirelesslysends a wireless profile (SSID, authentication mode, encryption mode,password, etc.), which is needed to establish a wireless connection, tothe object apparatus. According to this configuration, in case theprinter 10 is operating in the G/O state, the printer 10 can wirelesslycommunicate the wireless profile with the object apparatusappropriately. Moreover, the authentication mode and the encryption modeare predetermined. Further, the SSID and the password may be created bythe establishment controlling unit 42 in the process S88, or may bepredetermined.

The object apparatus wirelessly receives the wireless profile from theprinter 10. Thereby, the printer 10 and the object apparatus can use thesame wireless profile. That is, by using the wireless profile, theprinter 10 and the object apparatus wirelessly communicate anAuthentication Request, Authentication Response, Association Request,Association Response, and 4way handshake (in the printer 10, theestablishment controlling unit 42 executes this wireless communication).During this process, the printer 10 and the object apparatus executevarious authentication processes such as SSID authentication,authentication mode and encryption mode authentication, passwordauthentication, etc. In case all the authentications succeeded, awireless connection is established between the printer 10 and the objectapparatus. Moreover, in case the authentication of the PIN code failed,the authentication connection process ends without a wireless connectionbeing established between the printer 10 and the object apparatus.

Moreover, if the wireless connection is established in S88, thecontroller 30 further adds the MAC address of the object apparatus tothe administration list. Thereby, it becomes possible to communicateobject data (printing data, etc.) of a communication object between theprinter 10 that is in the G/O state and the object apparatus that is inthe client state. Moreover, the object data includes network layer data,which is a layer higher than the physical layer of the OSI referencemodel. That is, the printer 10 that is in the G/O state can executewireless communication of the network layer with the object apparatusthat is in the client state. Further, it becomes possible for theprinter 10 that is in the G/O state to relay wireless communicationbetween the object apparatus which is in the client state and anotherapparatus which is registered in the administration list.

On the other hand, in S90, the establishment controlling unit 42executes WPS negotiation for the client state. Specifically, after theauthentication of the PIN code has succeeded, this authentication beingexecuted in the same manner as S88, the establishment controlling unit42 wirelessly receives a wireless profile (SSID, authentication mode,encryption mode, password, etc.), which is needed to establish awireless connection, from the object apparatus. According to thisconfiguration, in case the printer 10 is operating in the client state,the printer 10 can communicate the wireless profile with the objectapparatus appropriately. The subsequent processes (the communicationprocess of the Authentication Request, etc.) are the same as S88.Consequently, the printer 10 that is in the client state becomes able towirelessly communicate object data (printing data, etc.) with the objectapparatus that is in the G/O state. Further, it becomes possible for theprinter 10 that is in the client state to wirelessly communicate, viathe object apparatus that is in the G/O state, object data with anotherapparatus (i.e., another apparatus registered in the administration listof the object apparatus). When S88 or S90 ends, the authenticationconnection process of FIG. 4 ends.

(Case A; FIG. 5)

An example of processes executed by the printer 10 and the PC 60 (CaseA) will be described with reference to FIG. 5. At the time of startingthe processes of FIG. 5, the setting of the printer 10 is the WFD I/FOFF setting. The user performs the mode selection operation in theoperating unit 12 of the printer 10 to select the PIN code mode or thePBC mode. In this case, the printer 10 determines YES in S22 of FIG. 2,determines NO in S40 of FIG. 3, and in S42 of FIG. 3 displays a screenprompting change to the WFD I/F ON setting.

While looking at the screen displayed in S42 of FIG. 3, the userperforms an operation in the operating unit 12 of the printer 10 tochange to the WFD I/F ON setting. In this case, the printer 10determines YES in S44 of FIG. 3, and starts the Listen process (S46 ofFIG. 3). In this case, the Search process is not executed. That is, inthe present embodiment, only the Listen process is executed, with theoperation to change to the WFD I/F ON setting (YES in S44) beingperformed being the trigger, and the Search process is not executed. Ifa configuration were adopted in which both the Listen process and theSearch process were performed with YES in S44 as the trigger, the timefor executing the Listen process would be shorter, and consequently itwould become difficult for the PC 60 to find the printer 10. Since theprinter 10 of the present embodiment does not execute the Search processwith YES in S44 as the trigger, the time for executing the Listenprocess can be kept longer, and consequently the PC 60 can find theprinter 10 appropriately. However, in a variant, the Listen process andthe Search process may be executed repeatedly as a set with theoperation to change to the WFD I/F ON setting being performed (YES inS44) being the trigger.

The user performs the mode selection operation in the operating unit ofthe PC 60 to select the PIN code mode or the PBC mode. In this case, thePC 60 executes the Scan process, the Listen process, and the Searchprocess. In the course of the Search process, the PC 60 wirelessly sendsa Probe Request signal to the printer 10. As described above, since theprinter 10 has started the Listen process, the printer 10 wirelesslysends a Probe Response signal to the PC 60. Consequently, the PC 60 canfind the printer 10, and the apparatus list including informationrelated to the printer 10 can be displayed in the display unit of the PC60.

On the other hand, in S48 of FIG. 3 the printer 10 displays a screenprompting the setting of the object apparatus to be changed to the WFDI/F ON setting. While looking at the screen displayed in S48 of FIG. 3,the user performs the operation to select the OK button in the operatingunit 12 of the printer 10. In this case, the printer 10 determines YESin S50 of FIG. 3. Since the printer 10 has not received a connectionrequest signal from the PC 60, NO is determined in S52 of FIG. 3, andthe Scan process, the Listen process, and the Search process areexecuted (S54 of FIG. 3). During the Search process, the printer 10wirelessly sends a Probe Request signal to the PC 60, and wirelesslyreceives a Probe Response signal from the PC 60. Consequently, theprinter 10 can find the PC 60, and can cause the apparatus listincluding information related to the PC 60 to be displayed in thedisplay unit 14 (S58 of FIG. 3).

(Case A1)

For example, the user can select the PC 60 from the apparatus listdisplayed in the display unit 14 of the printer 10 before selecting theprinter 10 from the apparatus list displayed in the PC 60. In this case,the printer 10 determines YES in S60 of FIG. 3, and executes theauthentication connection process of S62 of FIG. 3. In theauthentication connection process (S84 of FIG. 4), the printer 10wirelessly sends a connection request signal to the PC 60. As is clearfrom this description, the connection request signal that is sent fromthe printer 10 in case A1 is a signal sent in the case where the printer10 finds the PC 60 (i.e., the case where the printer 10 receives a ProbeResponse signal from the PC 60). Upon wirelessly receiving theconnection request signal from the printer 10, the PC 60 wirelesslysends an OK signal to the printer 10. Moreover, in this case, the PC 60wirelessly sends the OK signal to the printer 10 in response to theconnection request signal received from the printer 10 without the userneeding to select the printer 10 from the apparatus list displayed inthe PC 60. Then, the processes from S82 of FIG. 4 onwards are executed,and a wireless connection between the printer 10 and the PC 60 isestablished.

(Case A2)

For example, the user can select the printer 10 from the apparatus listdisplayed in the PC 60 before selecting the PC 60 from the apparatuslist displayed in the display unit 14 of the printer 10. In this case,the PC 60 wirelessly sends a connection request signal to the printer10. As is clear from this description, the connection request signalthat is sent from the PC 60 in case A2 is a signal sent in the casewhere the PC 60 finds the printer 10 (i.e., the case where the PC 60receives a Probe Response signal from the printer 10). Upon receivingthe connection request signal from the PC 60, the printer 10 determinesYES in S56 of FIG. 3, and executes the authentication connection processof S62 of FIG. 3. Consequently, the user does not need to select the PC60 from the apparatus list displayed in the printer 10. The processesfrom S82 of FIG. 4 onwards are executed, and a wireless connectionbetween the printer 10 and the PC 60 is established.

(Case B; FIG. 6)

In case B of FIG. 6, the user performs the operation to change to theWFD I/F ON setting before performing the mode selection operation in theoperating unit 12 of the printer 10 to select the PIN code mode or thePBC mode. In this case, the printer 10 determines YES in S10 of FIG. 2,and starts the Listen process (S12 of FIG. 2). In this case, the Searchprocess is not executed.

The user might mistakenly perform the mode selection operation in anoperating unit of the PC 70 despite wanting to cause the PC 60 to bewirelessly connected with the printer 10. In this case, the PC 70executes the Search process, and wirelessly sends a Probe Request signalto the printer 10. As described above, since the Listen process hasstarted in the printer 10, the printer 10 wirelessly sends a ProbeResponse signal to the PC 70. Consequently, the PC 70 can find theprinter 10, and an apparatus list including information related to theprinter 10 can be displayed in a display unit of the PC 70.

The user can select the printer 10 from the apparatus list displayed inthe PC 70. In this case, the printer 10 determines YES in S18 of FIG. 2,and causes information related to the PC 70 to be stored in thepredetermined storage area within the memory 34.

Next, upon realizing the mistake, the user performs the mode selectionoperation in the operating unit of the PC 60. In this case, the PC 60executes the Search process, and wirelessly sends a Probe Request signalto the printer 10. As described above, since the Listen process hasstarted in the printer 10, the printer 10 wirelessly sends a ProbeResponse signal to the PC 60. Consequently, the PC 60 can find theprinter 10, and the apparatus list including information related to theprinter 10 can be displayed in the display unit of the PC 60.

The user can select the printer 10 from the apparatus list displayed inthe PC 60. In this case, the PC 60 wirelessly sends a connection requestsignal to the printer 10. Consequently, the printer 10 determines YES inS18 of FIG. 2, deletes the information related to the PC 70 from thepredetermined storage area, and causes information related to the PC 60to be stored in the predetermined storage area. That is, the printer 10updates the stored contents of the predetermined storage area.

Next, the user performs the mode selection operation in the operatingunit 12 of the printer 10 to select the PIN code mode or the PBC mode.In this case, the printer 10 determines YES in S22 of FIG. 2, and thendetermines YES in S40 of FIG. 3. Thereupon, while looking at the screendisplayed in S48 of FIG. 3, the user selects the OK button. In thiscase, the printer 10 determines YES in S50 of FIG. 3, then determinesYES in S52 of FIG. 3, skips S54 to S60, and proceeds to theauthentication connection process of S62. That is, since the printer 10does not execute the Listen process and the Search process, theauthentication connection process can be started quickly. Further, sincethe apparatus list in the printer 10 is not displayed, the user does notneed to select the PC 60 from the apparatus list. In the authenticationconnection process (S84 of FIG. 4), the printer 10 wirelessly sends aconnection request signal to the PC 60. Then the processes from S82 ofFIG. 4 onwards are executed, and a wireless connection between theprinter 10 and the PC 60 is established.

As described above, only information related to the sending source ofthe most recently received connection request signal is stored in thepredetermined storage area within the memory 34. Consequently the usercan appropriately establish a wireless connection between the PC 60 andthe printer 10.

(Case B1)

Case B1 is a case in which a wireless connection is established betweenthe printer 10 and the PC 60, the printer 10 is in the G/O state, andthe PC 60 is in the client state.

While the printer 10 is in the G/O state, the communication controllingunit 40 wirelessly sends a beacon signal in which the destination isunspecified. The beacon signal includes information related to theprinter 10 (e.g., MAC address, IP address of the printer 10, etc.).Consequently, by receiving the beacon signal, the PC 60 that is in theclient state can confirm that communication is possible with the printer10 that is in the G/O state (e.g., the power supply of the printer 10 isnot OFF, etc.).

Further, while the printer 10 is the G/O state, the communicationcontrolling unit 40 continues to execute the Listen process.Consequently, if a Probe Request signal were received from the PC 70,the communication controlling unit 40 can wirelessly send a ProbeResponse signal to the PC 70.

(Case B2)

Case B2 is a case in which a wireless connection is established betweenthe printer 10 and the PC 60, the printer 10 is in the client state, andthe PC 60 is in the G/O state.

While the printer 10 is in the client state, the communicationcontrolling unit 40 does not wirelessly send the beacon signal. Further,while the printer 10 is in the client state, the communicationcontrolling unit 40 does not execute the Listen process. Consequently,even if a Probe Request signal were received from the PC 70, thecommunication controlling unit 40 would not wirelessly send a ProbeResponse signal to the PC 70.

Moreover, although not shown, while the printer 10 is in the clientstate or the device state, the user can perform an operation in theoperating unit 12 of the printer 10 to change the printer 10 to the G/Ostate. In this case, as in case B of FIG. 6 (as in the case of change tothe WFD I/F ON setting), the communication controlling unit 40 continuesto execute the Listen process. Consequently, the PC 60, etc. canappropriately find the printer 10.

Result of Present Embodiment

As shown in FIG. 5, when the OK button displayed in the screen in S48 ofFIG. 3 is selected, the printer 10 executes the Listen process and theSearch process. Consequently, the printer 10 may find the PC 60, and thePC 60 may find the printer 10. Moreover, as shown in FIG. 5 and FIG. 6,the printer 10 executes the Listen process, with the change to the WFDI/F ON setting being the trigger, before the selection of the OK buttonis performed. Consequently, in the case where the PC 60 executes theSearch process before the selection of the OK button is performed in theprinter 10, the printer 10 can receive a Probe Request signal from thePC 60 and send a Probe Response signal to the PC 60. That is, since theListen process is performed before the selection of the OK button isperformed, the chance of the PC 60 finding the printer 10 can beimproved. Consequently, a wireless connection between the PC 60 and theprinter 10 can be established appropriately.

(Corresponding Relationships)

The printer 10 and the PC 60 are respectively examples of the “wirelesscommunication device” and the “specific external device”. The Listenprocess and the Search process are respectively examples of the“response process” and the “search process”. The operation to select theOK button included in the screen displayed in S48 of FIG. 3, and theoperation to change to the WFD I/F ON setting are respectively examplesof the “first operation” and the “second operation”. The period in whichthe Listen process and the Search process are performed after the OKbutton has been operated, and the period in which the Listen process isperformed after the operation to change to the WFD I/F ON setting hasbeen performed, are respectively examples of the “first period” and the“second period”. The Probe Request signal and the Probe Response signalare respectively examples of the “search signal” and the “responsesignal”. Further, the G/O state and the client state are respectivelyexamples of the “parent state” and the “child state”. Further, the WFDI/F OFF setting and the WFD I/F ON setting are respectively examples ofthe “first setting” and the “second setting”.

Variants of the foregoing embodiment are listed below.

(1) The “wireless communication device” is not restricted to the printer10, but may be another apparatus capable of wireless communication(e.g., a mobile phone, PDA, PC, server, FAX device, copier, scanner,multi-function device, etc.). Further, the “specific external device” isnot restricted to the PC 60, but may be another apparatus capable ofwireless communication (e.g., a mobile phone, PDA, server, printer, FAXdevice, copier, scanner, multi-function device, etc.).

(2) The “parent state” is not restricted to the WFD G/O state, but maybe any state that manages other devices constituting the wirelessnetwork (e.g., manages a list of information relating to another device,relays wireless communication of another device, etc.). Further, the“child state” is not restricted to the WFD client state, but may be anystate managed by a parent state apparatus.

(3) In the foregoing embodiment, the operation to select the OK buttonincluded in the screen displayed in S48 of FIG. 3 is an example of the“first operation”. However, the “first operation” may be any kind ofoperation, as long as it is an operation to trigger the execution of thesearch process and response process.

(4) In the foregoing embodiment, the CPU 32 of the printer 10 realizesthe units 40, 42 by executing processes according to software. Instead,at least one of the units 40, 42 may be realized by a hardware resourcesuch as a logic circuit.

What is claimed is:
 1. A wireless communication device comprising: oneor more processors; and a memory configured to store computer-readableinstructions that, when executed by the one or more processors, causethe wireless communication device to perform: executing a responseprocess without executing a search process before a first operation isperformed, the response process including receiving a search signal froma specific external device and sending a response signal to the specificexternal device in response to the receiving the search signal, thesearch process including sending the search signal to the specificexternal device and receiving the response signal from the specificexternal device after the sending the search signal; executingrepeatedly a set of the response process and the search process when thefirst operation is performed; communicating a wireless profile with thespecific external device when the first operation is performed; andestablishing a wireless connection with the specific external device byusing the wireless profile when the wireless profile is communicated. 2.The wireless communication device as in claim 1, wherein the executingrepeatedly the set of the response process and the search processincludes: not executing the response process and the search process in acase where the first operation is performed after a connection requestsignal is received from the specific external device; and executing theresponse process and the search process in a first period after thefirst operation, with the first operation being performed before theconnection request signal is received from the specific external deviceas a trigger, and the connection request signal is a signal that thespecific external device sends to the wireless communication device in acase where the specific external device receives the response signalfrom the wireless communication device.
 3. The wireless communicationdevice as in claim 2, wherein in a case where the first operation isperformed after a plurality of connection request signals is receivedfrom a plurality of external devices including the specific externaldevice, the communicating the wireless profile includes communicatingthe wireless profile with the specific external device that is a sendingsource of the connection request signal received at last from among theplurality of the connection request signals.
 4. The wirelesscommunication device as in claim 1, wherein the wireless communicationdevice is configured to be capable of operating selectively in any stateamong a plurality of states including a parent state performing as aparent station of a wireless network and a child state performing as achild station of the wireless network, the communicating the wirelessprofile includes: communicating the wireless profile with the specificexternal device by sending the wireless profile to the specific externaldevice in a case where the wireless communication device operates in theparent state; and communicating the wireless profile with the specificexternal device by receiving the wireless profile from the specificexternal device in a case where the wireless communication deviceoperates in the child state.
 5. The wireless communication device as inclaim 4, wherein the executing the response process without executingthe search process includes: executing the response process withoutexecuting the search process in a second period before the firstoperation is performed; and starting the second period with a secondoperation for changing a first setting to a second setting as a trigger,the first setting is a setting in which the wireless communicationdevice is incapable of operating selectively in any state among theplurality of states, and the second setting is a setting in which thewireless communication device is capable of operating selectively in anystate among the plurality of states.
 6. The wireless communicationdevice as in claim 5, further comprising: a wired communicationinterface; and a wireless communication interface, wherein thecomputer-readable instructions that, when executed by the one or moreprocessors, cause the wireless communication device to further perform:being capable of executing a wired communication by using the wiredcommunication interface while a setting of the wireless communicationdevice is the first setting; being incapable of executing a wirelesscommunication by using the wireless communication interface while thesetting of the wireless communication device is the first setting; andbeing capable of executing the wireless communication by using thewireless communication interface while the setting of the wirelesscommunication device is the second setting; and being incapable ofexecuting a wired communication by using the wired communicationinterface while the setting of the wireless communication device is thesecond setting.
 7. The wireless communication device as in claim 4,wherein the computer-readable instructions that, when executed by theone or more processors, cause the wireless communication device tofurther perform: sending wirelessly a beacon signal includinginformation related to the wireless communication device while thewireless communication device is operating in the parent state.
 8. Thewireless communication device as in claim 4, wherein thecomputer-readable instructions that, when executed by the one or moreprocessors, cause the wireless communication device to further perform:being capable of executing the response process while the wirelesscommunication device operates in the parent state; and being incapableof executing the response process while the wireless communicationdevice operates in the child state.
 9. The wireless communication deviceas in claim 1, wherein the search process is a search process of theWi-Fi Direct scheme, the response process is a listen process of a Wi-FiDirect scheme, the search signal is a Probe Request signal, and theresponse signal is a Probe Response signal.
 10. A wireless communicationdevice configured to be capable of operating selectively in any stateamong a plurality of states including a Group Owner state of a Wi-FiDirect scheme and a Device state of the Wi-Fi Direct scheme, thewireless communication device comprising: one or more processors; and amemory configured to store computer-readable instructions that, whenexecuted by the one or more processors, cause the wireless communicationdevice to perform: receiving an operation that changes the Device stateof the wireless communication device to the Group Owner state; andexecuting a listen process of the Wi-Fi Direct scheme without executinga search process of the Wi-Fi Direct scheme in the Group Owner state inresponse to the receiving the operation, the listen process includingreceiving a Probe Request signal from a specific external device andsending a Probe Response signal to the specific external device inresponse to the receiving the Probe Request signal, the search processincluding sending a Probe Request signal to the specific external deviceand receiving a Probe Response signal form the specific external deviceafter the sending the Probe Request signal.
 11. The wirelesscommunication device as in claim 10, wherein the computer-readableinstructions that, when executed by the one or more processors, causethe wireless communication device to further perform: executingrepeatedly a set of the listen process and the search process in theDevice state.
 12. The wireless communication device as in claim 10,wherein the computer-readable instructions that, when executed by theone or more processors, cause the wireless communication device tofurther perform: executing the listen process without executing thesearch process in the Device state.
 13. The wireless communicationdevice as in claim 10, wherein the computer-readable instructions that,when executed by the one or more processors, cause the wirelesscommunication device to further perform: communicating a wirelessprofile with the specific external device; and establishing a wirelessconnection with the specific external device by using the wirelessprofile when the wireless profile is communicated.
 14. A non-transitorycomputer-readable medium storing computer instructions for a wirelesscommunication device, wherein the computer-readable instructions that,when executed by an one or more processors mounted on the wirelesscommunication device, cause the wireless communication device toperform: executing a response process without executing a search processbefore a first operation is performed, the response process includingreceiving a search signal from a specific external device and sending aresponse signal to the specific external device in response to thereceiving the search signal, the search process including sending thesearch signal to the specific external device and receiving the responsesignal from the specific external device after the sending the searchsignal; executing repeatedly a set of the response process and thesearch process when the first operation is performed; communicating awireless profile with the specific external device when the firstoperation is performed; and establishing a wireless connection with thespecific external device by using the wireless profile when the wirelessprofile is communicated.